# -*- coding: utf-8 -*-
'''
 Source file
 File name: BaseCmd.py
 Creation date: 11-09-2011
 Modification date: 30-12-2011
 Author: dassier
 Last Modifier: itey
 Release:
    -> Add verbose param tp __init__
    -> Add debugging variable
'''

from svi.core.logging import LogMsg

class BaseCmd(object):
 def __init__(self, param, client, conf):
     self._param = param
     self._client = client
     self._conf = conf

     # Message provider
     self._msg = LogMsg()

 def help(self):
    raise NotImplemented

 def run(self):
    raise NotImplemented


class Error(Exception):
    def __str__(self):
        return self.msg

class CommandLineError(Error):
    def __init__(self, message):
        self.msg = message

class ParameterError(Error):
    def __init__(self, message):
        self.msg = message




